<?php

namespace app\admin\validate;

use think\Validate;

class MedicalStaff extends Validate
{
    protected $failException = true;

    /**
     * 验证规则
     */
    protected $rule = [
        'name' => 'require',
        'store_id' => 'must|require',
    ];

    /**
     * 提示消息
     */
    protected $message = [
        'name.require' => '姓名不能为空',
        'store_id.require' => '请选择一个门店',
        'store_id.must' => '必需选择一个门店',
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => ['name', 'store_id'],
        'edit' => ['name', 'store_id'],
    ];

}
